package api.Impl;

import api.Flyweight;

// 具体享元类：棋子的颜色可以共享
public class GoPieceFlyweight implements Flyweight {
    private final String color; // 棋子的颜色（黑或白）

    public GoPieceFlyweight(String color) {
        this.color = color;
    }


    @Override
    public void display(String position) {
        System.out.println("Go Piece: Color = " + color + ", Position = " + position);
    }
}
